/*#include "LightTrail.h"
#include "Config.h"

using namespace Ogre;

template<> LightTrail* Singleton<LightTrail>::ms_Singleton = 0;

LightTrail::LightTrail()
{
	mTextTime = 5.0f;
	fadeOn = true;
}

void LightTrail::setPosition(Ogre::Real left, Ogre::Real top)
{
	mPanel->setPosition(left, top);
}

void LightTrail::setDimensions(Ogre::Real width, Ogre::Real height)
{
	mPanel->setDimensions(width, height);
}

void LightTrail::init()
{
	// Setting variables
	numRows = 5;
	mTextBox.resize(numRows, 0);
	mDisplayTime.resize(numRows, 0.0f);

	mOverlay = OverlayManager::getSingleton().create("LightTrailOverlay");

	mPanel = static_cast<OverlayContainer*>(OverlayManager::getSingleton().createOverlayElement("Panel", "container1"));
	mPanel->setMetricsMode(GMM_PIXELS);
	setDimensions(Config::LightTrail_WIDTH, Config::LightTrail_HEIGHT);
	setPosition(Config::LightTrail_LEFTPOS, Config::LightTrail_TOPPOS);

	// now create the text...
	String name;
	for (unsigned int i = 0; i < numRows; ++i)
	{
		name = "LightTrailRow"+StringConverter::toString(i);
		mTextBox[i] = OverlayManager::getSingleton().createOverlayElement("TextArea", name);
		mTextBox[i]->setMetricsMode(Ogre::GMM_PIXELS);
		mTextBox[i]->setDimensions(20, 5);		
		mTextBox[i]->setWidth(20);
		mTextBox[i]->setHeight(5);

		mTextBox[i]->setPosition(POSITION_TOP_X, POSITION_TOP_Y+i*SPACING);
		mTextBox[i]->setParameter("font_name", "StarWars");
		mTextBox[i]->setParameter("char_height", "12");
		mTextBox[i]->setColour(ColourValue::White);
		mTextBox[i]->setCaption(" ");
		mPanel->addChild(mTextBox[i]);
	}

	mOverlay->add2D(mPanel);
	mOverlay->show();
}

void LightTrail::addText(const String& text) 
{
	// first swap the content...
	for (unsigned int i = 0; i < numRows-1; ++i)
	{
		mTextBox[i]->setCaption(mTextBox[i+1]->getCaption());
		mDisplayTime[i] = mDisplayTime[i+1];
	}
	mTextBox[numRows-1]->setCaption(text);
	mDisplayTime[numRows-1] = mTextTime;
}

void LightTrail::loop(Real time) 
{
	if (fadeOn)
	{
		for (unsigned int i=0; i<numRows; ++i)
		{
			if (mDisplayTime[i] > 0)
				mDisplayTime[i] -= time;
			else
			{
				mDisplayTime[i] = 0.0f;
				mTextBox[i]->setCaption(" ");
			}
			mTextBox[i]->setColour(ColourValue(1,1,1,mDisplayTime[i]/mTextTime));
		}
	}
}

void LightTrail::clear() 
{
	for (unsigned int i=0; i<numRows; i++)
	{
		mTextBox[i]->setCaption(" ");
		mDisplayTime[i] = mTextTime;
		mTextBox[i]->setColour(ColourValue::White);
	}
	fadeOn = true;
}

void LightTrail::setFadeOn(bool on)
{
	fadeOn = on;
}*/